package com.nan.hrm;

import com.nan.hrm.doc.CourseDoc;
import com.nan.hrm.util.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

@RequestMapping("/escourse")
@FeignClient(value = "search-server",fallbackFactory = CourseEsClientHystrixFallbackFactory.class)
public interface CourseEsClient {
    @RequestMapping("/course")
     AjaxResult save(@RequestBody CourseDoc courseDoc);

    @DeleteMapping("/{id}")
    public AjaxResult delete(@PathVariable("id") Long id);
}
